<template>
  <div class="container">
    <div class="fixed-sidebar">
      <!-- 固定的左边信息栏内容 -->
      <form-dialog2
        v-model="showDialogs1"
        @submits1="handleSubmits1"
        :parentDatas1="messages1"
      ></form-dialog2>
      <form-dialog4
        v-model="showDialogse1"
        @submitse1="handleSubmitse1"
        :parentDatase1="messagese1"
        ref="FormDialog1"
      ></form-dialog4>
      <form-dialog4
        v-model="showDialogse2"
        @submitse2="handleSubmitse2"
        :parentDatase2="messagese2"
        ref="FormDialog2"
      ></form-dialog4>
      <form-dialog4
        v-model="showDialogse3"
        @submitse3="handleSubmitse3"
        :parentDatase3="messagese3"
        ref="FormDialog3"
      ></form-dialog4>
      <form-dialog4
        v-model="showDialogse4"
        @submitse4="handleSubmitse4"
        :parentDatase4="messagese4"
        ref="FormDialog4"
      ></form-dialog4>
      <form-dialog4
        v-model="showDialogsesx"
        @submitsesx="handleSubmitsesx"
        :parentDatasesx="messagesesx"
        ref="FormDialogsx"
      ></form-dialog4>
      <form-dialog5
        v-model="showDialogse5"
        @submitse5="handleSubmitse5"
        :parentDatase5="messagese5"
        ref="FormDialog5"
      ></form-dialog5>
      <div class="sidebar-content1">
        <div class="s-title">
          <img
            class="mmg"
            src="../../assets/images/icon_h1h6rlt6v8d/zuojiantou7.png"
            mode=""
            @click="imaged"
          />
          <h5>基本信息</h5>
          <div>
            <img
              src="../../assets/images/icon_txm.png"
              alt=""
              class="i1"
              @click="sets"
            />
            <img
              src="../../assets/images/b79031a7b47c874c055f474e1d48be4970f24ed6252e-RU07Ix.png"
              alt=""
              class="img1"
              @click="set"
            />
            <img
              src="../../assets/images/_20240521231143.png"
              alt=""
              class="img1"
              @click="showDialogs1 = true"
            />
          </div>
        </div>
        <div>
          <div class="t1">
            <p>姓名:</p>
            <p>{{ this.user.Get_CheckSub_Data.Pson_Name }}</p>
          </div>
          <div class="t1">
            <p>性别:</p>
            <p>{{ this.user.Get_CheckSub_Data.Pson_Sex }}</p>
          </div>
          <div class="t1">
            <p>年龄:</p>
            <p>{{ this.user.Get_CheckSub_Data.Pson_Age }}</p>
          </div>
          <div class="t1">
            <p>身份证:</p>
            <p>{{ this.user.Get_CheckSub_Data.Pson_CardID }}</p>
          </div>
          <!-- <div class="t1" v-if="this.user.Get_CheckSub_Data.Pson_Tel">
            <p>手机号:</p>
            <p>{{ this.user.Get_CheckSub_Data.Pson_Tel }}</p>
          </div> -->
          <div class="t1">
            <p>体检编号:</p>
            <p>{{ this.user.Get_CheckSub_Data.Check_No }}</p>
          </div>
          <div class="t1">
            <p>体检日期:</p>
            <p>{{ this.user.Get_CheckSub_Data.Check_Date }}</p>
          </div>
          <div class="t1">
            <p>人群类型:</p>
            <p>{{ this.user.Get_CheckSub_Data.Pson_Tag }}</p>
          </div>
        </div>
      </div>
      <div class="sidebar-content2">
        <div class="content2-nent">
          <div class="t1">
            <p>身高:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_Height }}</p>
          </div>
          <div class="t1">
            <p>体重:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_Weight }}</p>
          </div>
          <div class="t1">
            <p>BMI值:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_Bmi }}</p>
          </div>
          <div class="t1">
            <p>腰围:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_Waistline }}</p>
          </div>
          <div class="t1">
            <p>左手收缩压值:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_Constriction_L }}</p>
          </div>
          <div class="t1">
            <p>左手舒张压值:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_Diastolic_L }}</p>
          </div>
          <div class="t1">
            <p>左眼视力:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_LeftEye }}</p>
          </div>
          <div class="t1">
            <p>右眼视力:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_RightEye }}</p>
          </div>
          <div class="t1">
            <p>左眼矫正视力:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_RecLeftEye }}</p>
          </div>
          <div class="t1">
            <p>右眼矫正视力:</p>
            <p>{{ this.user.Get_CheckSub_Data.Sub_RecRightEye }}</p>
          </div>
        </div>
      </div>
      <div class="sidebar-content3" @click="sendsj">
        <h3 class="s-h3">提交数据</h3>
      </div>
    </div>
    <div class="scrollable-content" @scroll="handleScroll" :key="componentKey">
      <div class="tab">
        <div class="tabd">
          <div v-for="(item, index) in dd" :key="index" class="tab-list">
            <el-button class="ppp" @click="scrollTo(item[0].Sub_TypeID)">
              {{ item[0].Sub_TypeName }}</el-button
            >
          </div>
        </div>
        <div class="tabd">
          <div v-for="(item, index) in this.tab2" :key="index" class="tab-list">
            <el-button
              class="ppp"
              @click="scrollTo1(index)"
              v-show="show.Gw_InHos == '1' && index == 0"
              >{{ item }}</el-button
            >
            <el-button
              class="ppp"
              @click="scrollTo1(index)"
              v-show="show.Gw_Sss == '1' && index == 1"
              >{{ item }}</el-button
            >
            <el-button
              class="ppp"
              @click="scrollTo1(index)"
              v-show="show.Gw_BadHos == '1' && index == 2"
              >{{ item }}</el-button
            >
            <el-button
              class="ppp"
              @click="scrollTo1(index)"
              v-show="show.Gw_YhHos == '1' && index == 3"
              >{{ item }}</el-button
            >
            <el-button
              class="ppp"
              @click="scrollTo1(index)"
              v-show="show.Gw_Yyqk == '1' && index == 4"
              >{{ item }}</el-button
            >
          </div>
        </div>
      </div>
      <!-- 滚动的内容 -->
      <div class="st">
        <div class="rank_box">
          <div>
            <div
              v-for="(item, index1) in dd"
              :key="index1"
              class="rank_div"
              :id="`rank_div${item[0].Sub_TypeID}`"
            >
              <h2>{{ index1 + 1 }} {{ item[0].Sub_TypeName }}</h2>
              <div
                v-for="(u, indexs) in item"
                :key="indexs"
                :id="`tt${u.Rever_Sub}`"
                class="tt"
                :class="`tt${u.Rever_Sub}`"
              >
                <div v-if="u.Val_Type == 1" class="ttd" id="pdd">
                  <div
                    :id="`ttd${u.Rever_Sub}`"
                    :class="`ttd${u.Rever_Sub}`"
                    class="ttd"
                  >
                    <h3>{{ u.Sub_Name }}</h3>
                    <input
                      type="text"
                      class="input"
                      ref="input"
                      :style="{
                        color:
                          u.Val_Old !== user.jkwd[index1][indexs].check
                            ? 'red'
                            : 'black',
                      }"
                      v-model="user.jkwd[index1][indexs].check"
                      @input="updateInputValue00($event.target.value, u)"
                      @focus="handleFocus"
                    />
                    <h3>{{ u.Val_Unit }}</h3>
                  </div>
                </div>
                <div v-if="u.Val_Type == 0">
                  <div v-show="u.Val_SctMode == 2" class="ttd">
                    <div
                      v-if="(u.Sub_SysType == '' || u.Sub_SysType == '0')"
                      class="ttd"
                      :id="`ttd${u.Rever_Sub}`"
                    >
                      <h3>{{ u.Sub_Name }}</h3>
                      <input
                        type="text"
                        class="input"
                        ref="input"
                        :style="{
                          color:
                            u.Val_Old !== user.jkwd[index1][indexs].check
                              ? 'red'
                              : 'black',
                        }"
                        v-model="user.jkwd[index1][indexs].check"
                        @input="updateInputValue0($event.target.value, u)"
                        @focus="handleFocus"
                      />
                      <h3>{{ u.Val_Unit }}</h3>
                    </div>
                    <div v-if="u.Sub_SysType == '5'" class="qc">
                      <div
                        :id="`ttd${u.Rever_Sub}`"
                        class="q1"
                        v-show="
                          user.jkwd[index1][1].checkedlist.includes('缺齿')
                        "
                      >
                        <span class="s1">缺齿</span>
                        <el-row>
                          <el-col :span="12">
                            <input
                              placeholder="右上"
                              ref="input"
                              class="cross-input"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][3]) !=
                                  user.jkwd[index1][3].check
                                    ? 'red'
                                    : 'black',
                              }"
                              v-model="user.jkwd[index1][3].check"
                              @input="
                                updateInputValue($event.target.value, item[3])
                              "
                            />
                          </el-col>
                          <el-col :span="12">
                            <input
                              placeholder="左上"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][2]) !=
                                  user.jkwd[index1][2].check
                                    ? 'red'
                                    : 'black',
                              }"
                              @input="
                                updateInputValue($event.target.value, item[2])
                              "
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][2].check"
                            />
                          </el-col>
                          <el-col :span="12">
                            <input
                              placeholder="右下"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][5]) !=
                                  user.jkwd[index1][5].check
                                    ? 'red'
                                    : 'black',
                              }"
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][5].check"
                              @input="
                                updateInputValue($event.target.value, item[5])
                              "
                            />
                          </el-col>
                          <el-col :span="12">
                            <input
                              placeholder="左下"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][4]) !=
                                  user.jkwd[index1][4].check
                                    ? 'red'
                                    : 'black',
                              }"
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][4].check"
                              @input="
                                updateInputValue($event.target.value, item[4])
                              "
                            />
                          </el-col>
                        </el-row>
                      </div>
                      <div
                        class="q2"
                        v-show="
                          user.jkwd[index1][1].checkedlist.includes('龋齿')
                        "
                      >
                        <span class="s1">龋齿</span>
                        <el-row>
                          <el-col :span="12">
                            <input
                              placeholder="右上"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][7]) !=
                                  user.jkwd[index1][7].check
                                    ? 'red'
                                    : 'black',
                              }"
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][7].check"
                              @input="
                                updateInputValue($event.target.value, item[7])
                              "
                            />
                          </el-col>
                          <el-col :span="12">
                            <input
                              placeholder="左上"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][6]) !=
                                  user.jkwd[index1][6].check
                                    ? 'red'
                                    : 'black',
                              }"
                              @input="
                                updateInputValue($event.target.value, item[6])
                              "
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][6].check"
                            />
                          </el-col>
                          <el-col :span="12">
                            <input
                              placeholder="右下"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][9]) !=
                                  user.jkwd[index1][9].check
                                    ? 'red'
                                    : 'black',
                              }"
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][9].check"
                              @input="
                                updateInputValue($event.target.value, item[9])
                              "
                            />
                          </el-col>
                          <el-col :span="12">
                            <input
                              placeholder="左下"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][8]) !=
                                  user.jkwd[index1][8].check
                                    ? 'red'
                                    : 'black',
                              }"
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][8].check"
                              @input="
                                updateInputValue($event.target.value, item[8])
                              "
                            />
                          </el-col>
                        </el-row>
                      </div>
                      <div
                        class="q3"
                        v-show="
                          user.jkwd[index1][1].checkedlist.includes('义齿')
                        "
                      >
                        <span class="s1">义齿</span>
                        <el-row>
                          <el-col :span="12">
                            <input
                              placeholder="右上"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][11]) !=
                                  user.jkwd[index1][11].check
                                    ? 'red'
                                    : 'black',
                              }"
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][11].check"
                              @input="
                                updateInputValue($event.target.value, item[11])
                              "
                            />
                          </el-col>
                          <el-col :span="12">
                            <input
                              placeholder="左上"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][10]) !=
                                  user.jkwd[index1][10].check
                                    ? 'red'
                                    : 'black',
                              }"
                              @input="
                                updateInputValue($event.target.value, item[10])
                              "
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][10].check"
                            />
                          </el-col>
                          <el-col :span="12">
                            <input
                              placeholder="右下"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][13]) !=
                                  user.jkwd[index1][13].check
                                    ? 'red'
                                    : 'black',
                              }"
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][13].check"
                              @input="
                                updateInputValue($event.target.value, item[13])
                              "
                            />
                          </el-col>

                          <el-col :span="12">
                            <input
                              placeholder="左下"
                              :style="{
                                color:
                                  getvaldef(user.jkwd[index1][12]) !=
                                  user.jkwd[index1][12].check
                                    ? 'red'
                                    : 'black',
                              }"
                              ref="input"
                              class="cross-input"
                              v-model="user.jkwd[index1][12].check"
                              @input="
                                updateInputValue($event.target.value, item[12])
                              "
                            />
                          </el-col>
                        </el-row>
                      </div>
                    </div>
                  </div>
                  <div v-if="u.Val_SctMode == 1">
                    <div>
                      <div class="ddd" :id="`ttd${u.Rever_Sub}`">
                        <h3>{{ u.Sub_Name }}(多选)</h3>
                        <div
                          v-if="
                            (getUserPosts(u).length == 7 ||
                              getUserPosts(u).length == 8) &&
                            getUserPosts(u)[0].Opt_IsNormal !== '1'
                          "
                          :id="`ttd${u.Rever_Sub}`"
                          class="dddd"
                        >
                          <van-switch
                            v-model="user.jkwd[index1][indexs].check1"
                            @change="
                              checkAllChange(
                                user.jkwd[index1][indexs].check1,
                                getUserPosts(u),
                                u
                              )
                            "
                          />
                          <h3>全选</h3>
                        </div>
                      </div>
                      <van-checkbox-group
                        v-model="user.jkwd[index1][indexs].checkedlist"
                        class="tts"
                      >
                        <van-checkbox
                          v-for="option in getUserPosts(u)"
                          :key="option.Opt_Name"
                          :name="option.Opt_Name"
                          :class="{
                            changed:
                              u.Sub_IsSave !== '0' &&
                              JSON.stringify(
                                getvaldef(u).split(',').slice().sort()
                              ) !==
                                JSON.stringify(
                                  Array.from(
                                    user.jkwd[index1][indexs].checkedlist
                                  )
                                    .slice()
                                    .sort()
                                )
                                ? true
                                : false,
                          }"
                          @click.prevent="
                            onerinet(
                              option,
                              indexs,
                              getUserPosts(u),
                              u.Val_Def,
                              user.jkwd[index1][indexs].checkedlist
                            )
                          "
                        >
                          <p class="pp">{{ option.Opt_Name }}</p>
                          <div
                            v-show="
                              option.Sub_OtOptID !== '' &&
                              option ==
                                getUserPosts(u)[getUserPosts(u).length - 1]
                            "
                            class="dds"
                            :style="{ transform: 'scale(' + scale + ')' }"
                          >
                            <input
                              :disabled="
                                user.jkwd[index1][indexs].checkedlist.includes(
                                  '其他'
                                ) == false &&
                                user.jkwd[index1][indexs].checkedlist.includes(
                                  '有'
                                ) == false &&
                                user.jkwd[index1][indexs].Sub_OtOptRlt == ''
                              "
                              type="text"
                              class="input"
                              @keyup.enter="handleGoKey"
                              ref="input"
                              @focus.stop="handleFocus"
                              :style="{
                                color:
                                  getSub_OtOptRlt(user.jkwd[index1][indexs]) !==
                                    '' ||
                                  user.jkwd[index1][indexs].Sub_OtOptRlt !== ''
                                    ? 'red'
                                    : 'black',
                              }"
                              @blur="handleBlur"
                              v-model="user.jkwd[index1][indexs].Sub_OtOptRlt"
                              @click.stop="
                                updateInputValue1(
                                  $event.target.value,
                                  u,
                                  option
                                )
                              "
                              @input.stop="
                                updateInputValue1(
                                  $event.target.value,
                                  u,
                                  option
                                )
                              "
                            />
                            <el-button
                              v-if="u.Val_OtOpts !== ''"
                              @click.stop="select(u, getUserPosts(u))"
                              >选择</el-button
                            >
                          </div>
                        </van-checkbox>
                      </van-checkbox-group>
                    </div>
                  </div>
                  <div v-if="u.Val_SctMode == 0">
                    <div :id="`ttd${u.Rever_Sub}`">
                      <div class="ttd">
                        <h3>{{ u.Sub_Name }}(单选)</h3>
                        <el-button
                          class="bbbn"
                          type="primary"
                          @click="onuser1(getUserPosts(u))"
                          >重置</el-button
                        >
                      </div>
                      <van-radio-group
                        v-model="user.jkwd[index1][indexs].check"
                        class="tts"
                      >
                        <van-cell-group
                          v-for="i in getUserPosts(u)"
                          :key="i.Sub_ID"
                        >
                          <van-radio
                            :name="`${i.Opt_Name}`"
                            :class="{
                              changed:
                                u.Sub_IsSave !== '0' &&
                                JSON.stringify(getvaldef(u)) !==
                                  JSON.stringify(
                                    user.jkwd[index1][indexs].check
                                  )
                                  ? true
                                  : false,
                            }"
                            @click.prevent="
                              onuser(
                                i.Opt_Name,
                                i.Sub_ID,
                                indexs,
                                i,
                                getUserPosts(u)
                              )
                            "
                            border
                            ><p class="pp">{{ i.Opt_Name }}</p></van-radio
                          >
                          <div
                            v-show="
                              i.Sub_OtOptID !== '' &&
                              i == getUserPosts(u)[getUserPosts(u).length - 1]
                            "
                            class="dds"
                          >
                            <input
                              :disabled="
                                user.jkwd[index1][indexs].check != '其他' &&
                                user.jkwd[index1][indexs].check != '有' &&
                                user.jkwd[index1][indexs].check != '异常' &&
                                user.jkwd[index1][indexs].Sub_OtOptRlt == ''
                              "
                              type="text"
                              class="input"
                              @keyup.enter="handleGoKey"
                              ref="input"
                              @focus.stop="handleFocus"
                              @blur="handleBlur"
                              :style="{
                                color:
                                  getSub_OtOptRlt(user.jkwd[index1][indexs]) !==
                                    '' ||
                                  user.jkwd[index1][indexs].Sub_OtOptRlt !== ''
                                    ? 'red'
                                    : 'black',
                              }"
                              v-model="user.jkwd[index1][indexs].Sub_OtOptRlt"
                              @click.stop="
                                updateInputValue1($event.target.value, u, i)
                              "
                              @input="
                                updateInputValue1($event.target.value, u, i)
                              "
                            />
                            <el-button
                              v-show="u.Val_OtOpts !== ''"
                              @click.stop="select(u, getUserPosts(u))"
                              >选择</el-button
                            >
                          </div>
                        </van-cell-group>
                      </van-radio-group>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="taa" id="taa0" v-show="show.Gw_InHos == '1'">
            <div>
              住院史
            </div>
            <el-button @click="showDialog1 = true" type="primary"
              >住院史新增</el-button
            >
            <my-form-dialog
              v-model="showDialog1"
              @s1="h1"
              @submit1="handleSubmit1"
              :parentData1="message1"
            ></my-form-dialog>
            <el-table :data="user.tableData1" border style="width: 100%;">
              <el-table-column prop="date1" label="入院日期" />
              <el-table-column prop="date2" label="出院院日期" />
              <el-table-column prop="date3" label="原因" />
              <el-table-column prop="date4" label="医疗机构名称" />
              <el-table-column prop="date5" label="病案号" />
              <el-table-column label="操作">
                <template #default="scope">
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="primary"
                    @click="handlexg1(scope.$index, scope.row)"
                    >修改</el-button
                  >
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="danger"
                    @click="handlesc1(scope.$index, scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
              <!-- 你的表格内容 -->
            </el-table>
          </div>
          <div class="taa" id="taa1" v-show="show.Gw_Sss == '1'">
            <div>
              手术史
            </div>
            <el-button @click="showDialogsx = true" type="primary">
              手术史新增</el-button
            >
            <my-form-dialog
              v-model="showDialogsx"
              @ssx="hsx"
              @submitsx="handleSubmitsx"
              :parentDatasx="messagesx"
            ></my-form-dialog>
            <el-table :data="user.tableDatasx" border style="width: 100%;">
              <el-table-column prop="date1" label="确诊日期" />
              <el-table-column prop="date2" label="原因" />
              <el-table-column label="操作">
                <template #default="scope">
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="primary"
                    @click="handlexgsx(scope.$index, scope.row)"
                    >修改</el-button
                  >
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="danger"
                    @click="handlescsx(scope.$index, scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
              <!-- 你的表格内容 -->
            </el-table>
          </div>
          <div class="taa" id="taa2" v-show="show.Gw_BadHos == '1'">
            <div>
              家庭病床史
            </div>
            <el-button @click="showDialog2 = true" type="primary"
              >家庭病床史新增</el-button
            >
            <my-form-dialog
              v-model="showDialog2"
              @s2="h2"
              @submit2="handleSubmit2"
              :parentData2="message2"
            ></my-form-dialog>
            <el-table :data="user.tableData2" border style="width: 100%;">
              <el-table-column prop="date1" label="建床日期" />
              <el-table-column prop="date2" label="撤床日期" />
              <el-table-column prop="date3" label="原因" />
              <el-table-column prop="date4" label="医疗机构名称" />
              <el-table-column prop="date5" label="病案号" />
              <el-table-column label="操作">
                <template #default="scope">
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="primary"
                    @click="handlexg2(scope.$index, scope.row)"
                    >修改</el-button
                  >
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="danger"
                    @click="handlesc2(scope.$index, scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
              <!-- 你的表格内容 -->
            </el-table>
          </div>
          <div class="taa" id="taa3" v-show="show.Gw_YhHos == '1'">
            <div>
              非免疫规划预防接种史
            </div>
            <el-button @click="showDialog3 = true" type="primary"
              >非免疫规划预防接种史新增</el-button
            >
            <my-form-dialog
              v-model="showDialog3"
              @s3="h3"
              @submit3="handleSubmit3"
              :parentData3="message3"
            ></my-form-dialog>
            <el-table :data="user.tableData3" border style="width: 100%;">
              <el-table-column prop="name" label="名称" width="100px" />
              <el-table-column prop="date1" label="接种日期" width="180px" />
              <el-table-column prop="date2" label="接种机构" />
              <el-table-column label="操作">
                <template #default="scope">
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="primary"
                    @click="handlexg3(scope.$index, scope.row)"
                    >修改</el-button
                  >
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="danger"
                    @click="handlesc3(scope.$index, scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
              <!-- 你的表格内容 -->
            </el-table>
          </div>
          <div class="taa" id="taa4" v-show="show.Gw_Yyqk == '1'">
            <div>
              主要用药情况
            </div>
            <div>
              <el-button @click="showDialog4 = true" type="primary"
                >主要用药情况新增</el-button
              >
              <el-button type="info" @click="_import">历史药品导入</el-button>
            </div>
            <my-form-dialog
              v-model="showDialog4"
              @s4="h4"
              @submit4="handleSubmit4"
              :parentData4="message4"
              :parentData5="message5"
            ></my-form-dialog>
            <el-table :data="user.tableData4" border style="width: 100%;">
              <!-- <el-table-column prop="date9" label="用药分类" /> -->
              <el-table-column prop="name" label="用药名称" />
              <el-table-column prop="date1" label="用法" />
              <el-table-column label="用量" prop="date2"></el-table-column>
              <el-table-column prop="date4" label="用药时间" />
              <el-table-column prop="date8" label="服药依从性" />
              <el-table-column label="操作">
                <template #default="scope">
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="primary"
                    @click="handlexg4(scope.$index, scope.row)"
                    >修改</el-button
                  >
                  <el-button
                    class="scopebutton"
                    size="small"
                    type="danger"
                    @click="handlesc4(scope.$index, scope.row)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { showDialog } from "vant";
import FormDialog2 from "./FormDialog2.vue";
import FormDialog4 from "./FormDialog4.vue";
import FormDialog5 from "./FormDialog5.vue";
import MyFormDialog from "./MyFormDialog.vue";
import { userStore } from "../../stores/user.ts";
import { ElMessageBox, ElMessage } from "element-plus";
export default {
  data() {
    return {
      mmrs: [],
      mrrs: [],
      bdd: ["其他", "有", "异常"],
      mrr: [],
      drr: [],
      setupdef: [],
      componentKey: 0,
      install: "",
      val1: "",
      isCheckAll: false,
      isIndeterminate: true,
      longList: Array.from({ length: 100 }, (_, i) => `项目 ${i + 1}`), // 示例长列表
      tabs: ["生活方式", "住院治疗情况", "Tab 3", "Tab 4"],
      tab2: [
        "住院历史",
        "手术史",
        "家庭病床史",
        "非免疫规划预防接种史",
        "主要用药情",
      ],
      activeTab: 0,
      activeTab: "",
      wtlist: "",
      ue: "",
      lists: [],
      check: false,
      checkedlist: [],
      customInputValue: "",
      scale: 1,
      checkboxGroup: null,
      user: "",
      dds: "",
      dd: [],
      ed: "",
      showDialog1: false,
      showDialog2: false,
      showDialog3: false,
      showDialog4: false,
      showDialogsx: false,
      showDialogs1: false,
      showDialogse1: false,
      showDialogse2: false,
      showDialogse3: false,
      showDialogse4: false,
      showDialogse5: false,
      showDialogsesx: false,
      showzzpg: false,
      tableData1: [],
      tableData2: [],
      tableData3: [],
      tableData4: [],
      tableDatasx: [],
      tableDatas4: [],
      tableData5: [],
      tableDatas1: {},
      message1: "0",
      message2: "1",
      message3: "2",
      message4: "3",
      messagesx: "sx",
      message5: {},
      messages1: "0",
      messagese1: null,
      messagese2: null,
      messagese3: null,
      messagese4: null,
      messagesesx: null,
      messagese5: null,
      messageszzpg: null,
      optlist: ["其他", "有"],
      sss: "",
      sss1: "",
      show: {},
      tdata1: [],
      tdata2: [],
      tdata3: [],
      tdata4: [],
      tdatasx: [],
      t1: [],
      t2: [],
      t3: [],
      t4: [],
      tsx: [],
      sx: [],
      ts4: [],
      loading: null,
      checkRadioFlag: false,
      send: true,
    };
  },
  components: {
    MyFormDialog,
    FormDialog2,
    FormDialog4,
    FormDialog5,
  },
  methods: {
    //导入历史药品
    _import() {
      axios
        .post(
          window.globalUrl.server + "Service.asmx/GetGwOldMedis",
          JSON.stringify({
            User_Code: this.User_Code,
            Interface_Code: this.Interface_Code,
            Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
          })
        )
        .then((res) => {
          if (res.data.RltCode == 1) {
            sessionStorage.removeItem("ts4");
            sessionStorage.removeItem("t4");
            this.user.tableDatas4 = [];
            this.user.tableData4 = [];
            this.ts4 = JSON.parse(res.data.RltData);
            this.user.tableDatas4 = this.ts4.map((item) => ({
              name: item["Medi_Name"],
              date1: item["Medi_UseName"],
              date1_id: item["Medi_Use"],
              date2: item["Medi_freqName"],
              date2_id: item["Medi_freq"],
              date3: item["Medi_EachDose"],
              date4: item["Medi_EachDoseUnit"],
              date5: item["Medi_DoseUnitName"],
              date5_id: item["Medi_DoseUnit"],
              date6: item["Medi_UseDate"],
              date7: item["Medi_UseDateUnitName"],
              date7_id: item["Medi_UseDateUnit"],
              date8: item["Medi_MedicineYieldName"],
              date8_id: item["Medi_MedicineYield"],
              // date9: item["Medi_Sugg"],
              // date9_id: item["Medi_TypeID"],
            }));
            sessionStorage.setItem(
              "ts4",
              JSON.stringify(this.user.tableDatas4)
            );
            this.user.tableData4 = this.user.tableDatas4.map((item) => ({
              name: item["name"],
              date1: item["date1"],
              date1_id: item["date1_id"],
              date2:
                item["date2"] +
                item["date3"] +
                "次；1次" +
                item["date4"] +
                item["date5"],
              date2_id: item["date2_id"],
              date3: item["date3"],
              date4: item["date6"] + item["date7"],
              dates4: item["date4"],
              date5: item["date5"],
              date5_id: item["date5_id"],
              date6: item["date6"],
              date7: item["date7"],
              date7_id: item["date7_id"],
              date8: item["date8"],
              date8_id: item["date8_id"],
              // date9: item["date9"],
              // date9_id: item["date9_id"],
            }));
            sessionStorage.setItem("t4", JSON.stringify(this.user.tableData4));
            showDialog({
              message: "历史用药品导入成功",
              theme: "success-button",
            }).then(() => {});
          } else if (res.data.RltCode == 0) {
            showDialog({
              message: "该用户没有历史用药记录",
              theme: "round-button",
            }).then(() => {});
          }
        });
    },
    //匹配默认值
    get_Valdef(u) {
      return Array.from(this.lists).filter((list) => list.Sub_ID == u.Sub_ID);
    },
    //匹配其他选项
    getid(option3) {
      return option3.filter((item) => item.Sub_OtOptID != "")[0];
    },
    //匹配对应题目的选项组
    getpost(u) {
      return this.lists.filter((list) => list.Sub_Name === u.Sub_Name);
    },
    getxx(option3) {
      return option3.filter((item) => item.Opt_IsNormal == "1")[0];
    },
    handleSubmitse5(val1, val2) {
      this.showDialogse5 = val2;
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (
            this.user.select_u.Sub_Name == item1.Sub_Name &&
            this.user.select_u.Sub_ID == item1.Sub_ID
          ) {
            item1.Sub_OtOptRlt = val1.join(",");
            item1.Sub_OtOptID = this.user.u2.Sub_OtOptID;
          }
        });
      });
      this.user.select_u = {};
      this.user.select = "";
      this.user.u2 = {};
      sessionStorage.setItem("select", JSON.stringify(this.user.select));
      sessionStorage.setItem("u2", JSON.stringify(this.user.u2));
      sessionStorage.setItem("select_u", JSON.stringify(this.user.select_u));
      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    select(u, u2) {
      if (
        (u.check != "有" && u.Val_Type == "0" && u.Val_SctMode == "0") ||
        (u.checkedlist.includes("其他") == false &&
          u.Val_Type == "0" &&
          u.Val_SctMode == "1")
      ) {
        this.showDialogse5 = false;
      } else {
        this.showDialogse5 = true;
        this.user.select = u.Val_OtOpts;
        this.user.select_u = u;
        this.user.u2 = u2[u2.length - 1];
      }
      sessionStorage.setItem("u2", JSON.stringify(this.user.u2));
      sessionStorage.setItem("select", JSON.stringify(this.user.select));
      sessionStorage.setItem("select_u", JSON.stringify(this.user.select_u));
    },
    scrollTo(tab) {
      document.getElementById(`rank_div${tab}`).scrollIntoView({
        behavior: "smooth",
        block: "start",
      });
    },
    scrollTo1(tab) {
      document.getElementById(`taa${tab}`).scrollIntoView({
        behavior: "smooth",
        block: "start",
      });
    },
    onRadioChange(val) {
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (item1.check == val) {
            item1.check = "";
          }
        });
      });
    },
    forceRefresh() {
      this.componentKey += 1;
    },
    imaged() {
      this.user.Get_CheckSub_Data = {};
      this.user.u2 = {};
      this.user.select_u = {};
      this.user.select = {};
      this.user.jkwdstartdate = null;
      this.user.jkwdenddate = null;
      sessionStorage.removeItem("jkwdstartdate");
      sessionStorage.removeItem("jkwdenddate");
      sessionStorage.removeItem("u2");
      sessionStorage.removeItem("select_u");
      sessionStorage.removeItem("select");
      sessionStorage.removeItem("t1");
      sessionStorage.removeItem("t2");
      sessionStorage.removeItem("t3");
      sessionStorage.removeItem("t4");
      sessionStorage.removeItem("ts4");
      sessionStorage.removeItem("sx");
      sessionStorage.removeItem("wd");
      sessionStorage.removeItem("data"), sessionStorage.removeItem("xq1");
      this.user.tableData1 = [];
      this.user.tableData2 = [];
      this.user.tableData3 = [];
      this.user.tableData4 = [];
      this.user.tableDatas4 = [];
      this.user.tableDatasx = [];
      this.$router.push("/tab");
    },
    checkAllChange(val1, val2, val3) {
      var listed = [];
      val2.forEach((item) => {
        listed.push(item.Opt_Name);
      });
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (item1.Sub_Name == val3.Sub_Name && val1 == true) {
            item1.checkedlist = listed;
          } else if (item1.Sub_Name == val3.Sub_Name && val1 == false) {
            item1.checkedlist = [];
          }
        });
      });
      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    handleSubmitse1(data1, data2, data3) {
      this.tableData1.splice(data3, 1, data1);
      this.tableData1 =
        this.user.tableData1 != null ? this.user.tableData1 : this.tableData1;
      this.user.tableData1 = this.tableData1;
      sessionStorage.setItem("t1", JSON.stringify(this.tableData1));
      ElMessage.success({ message: "修改成功" });
      this.showDialogse1 = false;
    },
    handleSubmitse2(data1, data2, data3) {
      this.tableData2 =
        this.user.tableData2 != null ? this.user.tableData2 : this.tableData2;
      this.tableData2.splice(data3, 1, data1);
      this.user.tableData2 = this.tableData2;
      sessionStorage.setItem("t2", JSON.stringify(this.tableData2));
      ElMessage.success({ message: "修改成功" });
      this.showDialogse2 = false;
    },
    handleSubmitse3(data1, data2, data3) {
      this.tableData3 =
        this.user.tableData3 != null ? this.user.tableData3 : this.tableData3;
      this.tableData3.splice(data3, 1, data1);
      this.user.tableData3 = this.tableData3;
      sessionStorage.setItem("t3", JSON.stringify(this.tableData3));
      ElMessage.success({ message: "修改成功" });
      this.showDialogse3 = false;
    },
    handleSubmitse4(data1, data2, data3) {
      var data1s = {
        name: data1.name,
        date1: data1.date1,
        date2:
          data1.date2 + data1.date3 + "次；1次" + data1.date4 + data1.date5,
        date3: data1.date3,
        date4: data1.date6 + data1.date7,
        dates4: data1.date4,
        date5: data1.date5,
        date6: data1.date6,
        date7: data1.date7,
        date8: data1.date8,
        date1_id: data1.date1_id,
        date2_id: data1.date2_id,
        date5_id: data1.date5_id,
        date7_id: data1.date7_id,
        date8_id: data1.date8_id,
        // date9: data1.date9,
        // date9_id: data1.date9_id,
      };
      var data1s1 = {
        name: data1.name,
        date1: data1.date1,
        date2: data1.date2,
        date3: data1.date3,
        date4: data1.date4,
        dates4: data1.date4,
        date5: data1.date5,
        date6: data1.date6,
        date7: data1.date7,
        date8: data1.date8,
        date1_id: data1.date1_id,
        date2_id: data1.date2_id,
        date5_id: data1.date5_id,
        date7_id: data1.date7_id,
        date8_id: data1.date8_id,
        // date9: data1.date9,
        // date9_id: data1.date9_id,
      };
      this.tableDatas4 =
        this.user.tableDatas4 != null
          ? this.user.tableDatas4
          : this.tableDatas4;
      this.tableData4 =
        this.user.tableData4 != null ? this.user.tableData4 : this.tableData4;
      this.tableDatas4.splice(data3, 1, data1s1);
      this.tableData4.splice(data3, 1, data1s);
      this.user.tableDatas4 = this.tableDatas4;
      this.user.tableData4 = this.tableData4;
      sessionStorage.setItem("ts4", JSON.stringify(this.tableDatas4));
      sessionStorage.setItem("t4", JSON.stringify(this.tableData4));
      ElMessage.success({ message: "修改成功" });
      this.showDialogse4 = false;
    },
    handleSubmitsesx(data1, data2, data3) {
      this.tableDatasx =
        this.user.tableDatasx != null
          ? this.user.tableDatasx
          : this.tableDatasx;
      this.tableDatasx.splice(data3, 1, data1);
      this.user.tableDatasx = this.tableDatasx;
      sessionStorage.setItem("sx", JSON.stringify(this.tableDatasx));
      ElMessage.success({ message: "修改成功" });
      this.showDialogsesx = false;
    },
    handlexg1(index, row) {
      this.$confirm("您确认要修改吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.messagese1 = this.user.tableData1[index];
          if (this.messagese1) {
            this.$refs.FormDialog1.receiveData1(this.messagese1, index);
            this.showDialogse1 = true;
          }
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消修改操作");
          // 如果需要可以在这里执行其他逻辑
        });
    },
    handlexg2(index, row) {
      this.$confirm("您确认要修改吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.messagese2 = this.user.tableData2[index];
          if (this.messagese2) {
            this.$refs.FormDialog2.receiveData2(this.messagese2, index);
            this.showDialogse2 = true;
          }
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消修改操作");
          // 如果需要可以在这里执行其他逻辑
        });
    },
    handlexg3(index, row) {
      this.$confirm("您确认要修改吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.messagese3 = this.user.tableData3[index];
          if (this.messagese3) {
            this.$refs.FormDialog3.receiveData3(this.messagese3, index);
            this.showDialogse3 = true;
          }
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消修改操作");
          // 如果需要可以在这里执行其他逻辑
        });
    },
    handlexg4(index, row) {
      this.$confirm("您确认要修改吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.messagese4 = this.user.tableDatas4[index];
          if (this.messagese4) {
            this.$refs.FormDialog4.receiveData4(this.messagese4, index);
            this.showDialogse4 = true;
          }
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消修改操作");
          // 如果需要可以在这里执行其他逻辑
        });
    },
    handlexgsx(index, row) {
      this.$confirm("您确认要修改吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.messagesesx = this.user.tableDatasx[index];
          if (this.messagesesx) {
            this.$refs.FormDialogsx.receiveDatasx(this.messagesesx, index);
            this.showDialogsesx = true;
          }
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消修改操作");
          // 如果需要可以在这里执行其他逻辑
        });
    },
    handlesc1(index, row) {
      this.$confirm("您确认要删除吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.tableData1 =
            this.user.tableData1 != null
              ? this.user.tableData1
              : this.tableData1;
          this.tableData1.splice(index, 1);
          sessionStorage.setItem("t1", JSON.stringify(this.tableData1));
          this.user.tableData1 = this.tableData1;
          ElMessage.success({ message: "删除成功" });
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消删除操作");
          // 如果需要可以在这里执行其他逻辑
        });
      // 删除操作，例如确认后从tableData中移除该行
    },
    handlesc2(index, row) {
      this.$confirm("您确认要删除吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.tableData2 =
            this.user.tableData2 != null
              ? this.user.tableData2
              : this.tableData2;
          this.tableData2.splice(index, 1);
          sessionStorage.setItem("t2", this.tableData4);
          this.user.tableData2 = this.tableData2;
          ElMessage.success({ message: "删除成功" });
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消删除操作");
          // 如果需要可以在这里执行其他逻辑
        });
      // 删除操作，例如确认后从tableData中移除该行
    },
    handlesc3(index, row) {
      this.$confirm("您确认要删除吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.tableData3 =
            this.user.tableData3 != null
              ? this.user.tableData3
              : this.tableData3;
          this.tableData3.splice(index, 1);
          sessionStorage.setItem("t3", this.tableData3);
          this.user.tableData3 = this.tableData3;
          ElMessage.success({ message: "删除成功" });
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消删除操作");
          // 如果需要可以在这里执行其他逻辑
        });
      // 删除操作，例如确认后从tableData中移除该行
    },
    handlesc4(index, row) {
      this.$confirm("您确认要删除吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.tableDatas4 =
            this.user.tableDatas4 != null
              ? this.user.tableDatas4
              : this.tableDatas4;
          this.tableData4 =
            this.user.tableData4 != null
              ? this.user.tableData4
              : this.tableData4;
          this.tableDatas4.splice(index, 1);
          this.tableData4.splice(index, 1);
          sessionStorage.setItem("ts4", JSON.stringify(this.tableDatas4));
          sessionStorage.setItem("t4", JSON.stringify(this.tableData4));
          this.user.tableDatas4 = this.tableDatas4;
          this.user.tableData4 = this.tableData4;
          ElMessage.success({ message: "删除成功" });
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消删除操作");
          // 如果需要可以在这里执行其他逻辑
        });
      // 删除操作，例如确认后从tableData中移除该行
    },
    handlescsx(index, row) {
      this.$confirm("您确认要删除吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        customClass: "messageBox",
      })
        .then(() => {
          // 用户点击确认
          this.tableDatasx =
            this.user.tableDatasx != null
              ? this.user.tableDatasx
              : this.tableDatasx;
          this.tableDatasx.splice(index, 1);
          sessionStorage.setItem("sx", this.tableDatasx);
          this.user.tableDatasx = this.tableDatasx;
          ElMessage.success({ message: "删除成功" });
          // 在这里执行跳转逻辑
        })
        .catch(() => {
          // 用户点击取消
          this.$message.info("已取消删除操作");
          // 如果需要可以在这里执行其他逻辑
        });
      // 删除操作，例如确认后从tableData中移除该行
    },
    guolu() {
      this.tdata4 = this.user.tableData4.map((item) => ({
        Medi_Name: item["name"],
        Medi_Use: item["date1_id"],
        Medi_freq: item["date2_id"],
        Medi_EachDose: item["date3"],
        Medi_EachDoseUnit: item["dates4"],
        Medi_DoseUnit: item["date5_id"],
        Medi_UseDate: item["date6"],
        Medi_UseDateUnit: item["date7_id"],
        Medi_MedicineYield: item["date8_id"],
        // Medi_TypeID: item["date9_id"],
      }));
      this.tdata1 = this.user.tableData1.map((item) => ({
        Hos_InDate: item["date1"],
        Hos_OutDate: item["date2"],
        Hos_Cause: item["date3"],
        Hos_Group: item["date4"],
        Hos_No: item["date5"],
      }));
      this.tdatasx = this.user.tableDatasx.map((item) => ({
        Jws_qzrq: item["date1"],
        Jws_mc: item["date2"],
      }));
      this.tdata2 = this.user.tableData2.map((item) => ({
        Hos_InDate: item["date1"],
        Hos_OutDate: item["date2"],
        Hos_Cause: item["date3"],
        Hos_Group: item["date4"],
        Hos_No: item["date5"],
      }));
      this.tdata3 = this.user.tableData3.map((item) => ({
        Ino_Name: item["name"],
        Ino_Date: item["date1"],
        Ino_Group: item["date2"],
      }));
    },
    lodding() {
      this.loading = this.$loading({
        lock: true,
        text: "健康问答数据提交中...",
        background: "rgba(0, 0, 0, 0.7)",
      });
    },

    verification() {
      this.send = true;
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
         
          if (item1.Val_Type == "0" && item1.Val_SctMode == "0") {
             console.log("uzi",item1)
            if (
              item1.Sub_SysType == "28" &&
              (this.user.Get_CheckSub_Data.Pson_Tag != ""
                ? this.user.Get_CheckSub_Data.Pson_Tag.split(",")
                : []
              ).includes("糖尿病") == true &&
              item1.check == ""
            ) {
              this.send = false;
              ElMessage.error({
                message: `检测到您题名为${item1.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
              });
            }
          }
          if (item1.Val_Type == "0" && item1.Val_SctMode == "1") {
            if (
              item1.checkedlist.includes("其他") == true &&
              item1.Sub_OtOptRlt == "" &&
              item1.Sub_OtOptID != ""
            ) {
              this.send = false;
              ElMessage.error({
                message: `检测到您题名为${item1.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
              });
            }
            this.mmrs = item.filter((list) => list.Rever_Sub == item1.Sub_ID);
            const m1 = this.mmrs.filter(
              (list1) => list1.Sub_SysType >= 5 && list1.Sub_SysType <= 8
            );
            const m2 = this.mmrs.filter(
              (list1) => list1.Sub_SysType >= 9 && list1.Sub_SysType <= 12
            );
            const m3 = this.mmrs.filter(
              (list1) => list1.Sub_SysType >= 13 && list1.Sub_SysType <= 16
            );
            if (this.mmrs.length > 0) {
              if (
                m1.some((e) => e.check != "") == false &&
                item1.checkedlist.includes(
                  this.getxx(this.getpost(item1)).Opt_Name
                ) == false &&
                item1.checkedlist.includes("缺齿") == true &&
                item1.Sub_SysType == "4"
              ) {
                this.send = false;
                ElMessage.error({
                  message: `检测到您题名为${item1.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
                });
              } else if (
                m2.some((e) => e.check != "") == false &&
                item1.checkedlist.includes(
                  this.getxx(this.getpost(item1)).Opt_Name
                ) == false &&
                item1.checkedlist.includes("龋齿") == true &&
                item1.Sub_SysType == "4"
              ) {
                this.send = false;
                ElMessage.error({
                  message: `检测到您题名为${item1.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
                });
              } else if (
                m3.some((e) => e.check != "") == false &&
                item1.checkedlist.includes(
                  this.getxx(this.getpost(item1)).Opt_Name
                ) == false &&
                item1.checkedlist.includes("义齿") == true &&
                item1.Sub_SysType == "4"
              ) {
                this.send = false;
                ElMessage.error({
                  message: `检测到您题名为${item1.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
                });
              }
            }
          } else if (item1.Val_Type == "0" && item1.Val_SctMode == "0") {
            //  console.log("uzi",item1)
            const bdd = ["其他", "有", "异常"];
            if (
              (bdd.includes(item1.check) == true &&
                item1.Sub_Requisite == "1" &&
                item1.Sub_OtOptRlt == "" &&
                item1.Sub_OtOptID != "") ||
              (item1.check == "" &&
                item1.Sub_Requisite == "1" &&
                item1.Rever_Val == "")
            ) {
              this.send = false;
              ElMessage.error({
                message: `检测到您题名为${item1.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
              });
            }
            item
              .filter(
                (list) =>
                  list.Rever_Sub == item1.Sub_ID && list.Sub_Requisite == "1"
              )
              .forEach((item2) => {
                if (item1.check == item2.Rever_Val && item1.check != "") {
                  return;
                } else if (
                  item1.check != item2.Rever_Val &&
                  item1.Sub_OtOptID == "" &&
                  (item2.check == "") & (item2.Val_Type == "0") &&
                  item2.Val_SctMode == "2"
                ) {
                  this.send = false;
                  ElMessage.error({
                    message: `检测到您题名为${item2.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
                  });
                } else if (
                  item1.check != item2.Rever_Val &&
                  item1.Sub_OtOptID == "" &&
                  item2.Val_Type == "0" &&
                  item2.Val_SctMode == "1" &&
                  item2.checkedlist == ""
                ) {
                  this.send = false;
                  ElMessage.error({
                    message: `检测到您题名为${item2.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
                  });
                } else if (
                  item1.check != item2.Rever_Val &&
                  item1.Sub_OtOptID == "" &&
                  item2.Val_Type == "1" &&
                  item2.check == ""
                ) {
                  this.send = false;
                  ElMessage.error({
                    message: `检测到您题名为${item2.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
                  });
                } else if (
                  item1.check != item2.Rever_Val &&
                  item1.Sub_OtOptID == "" &&
                  item2.Val_Type == "0" &&
                  item2.Val_SctMode == "0" &&
                  item2.check == ""
                ) {
                  this.send = false;
                  ElMessage.error({
                    message: `检测到您题名为${item2.Sub_Name}的问答中有选项未填值尚未作答,请认真检查`,
                  });
                }
              });
          }
        });
      });
    },
    async sendsj() {
      this.verification();

      if (this.send == true) {
        this.rmovesss();
        this.removesss1();
        await this.guolu();
        await this.lodding();
        if (this.show.Gw_InHos == "1") {
          axios
            .post(
              window.globalUrl.server + "Service.asmx/GwInHosInfo_Submit",
              JSON.stringify({
                User_Code: this.User_Code,
                Interface_Code: this.Interface_Code,
                Check_No: this.user.Get_CheckSub_Data.Check_No,
                Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
                Que_list: JSON.stringify(this.tdata1),
              })
            )
            .then((res) => {})
            .catch((eorro) => {
              console.log(eorro);
            });
        }
        if (this.show.Gw_Sss == "1") {
          axios
            .post(
              window.globalUrl.server + "Service.asmx/GwJws_SssInfo_Submit",
              JSON.stringify({
                User_Code: this.User_Code,
                Interface_Code: this.Interface_Code,
                Check_No: this.user.Get_CheckSub_Data.Check_No,
                Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
                Que_list: JSON.stringify(this.tdatasx),
              })
            )
            .then((res) => {})
            .catch((eorro) => {
              console.log(eorro);
            });
        }
        if (this.show.Gw_BadHos == "1") {
          axios
            .post(
              window.globalUrl.server + "Service.asmx/GwHomeHosInfo_Submit",
              JSON.stringify({
                User_Code: this.User_Code,
                Interface_Code: this.Interface_Code,
                Check_No: this.user.Get_CheckSub_Data.Check_No,
                Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
                Que_list: JSON.stringify(this.tdata2),
              })
            )
            .then((res) => {})
            .catch((eorro) => {
              console.log(eorro);
            });
        }
        if (this.show.Gw_YhHos == "1") {
          axios
            .post(
              window.globalUrl.server + "Service.asmx/GwIncolInfo_Submit",
              JSON.stringify({
                User_Code: this.User_Code,
                Interface_Code: this.Interface_Code,
                Check_No: this.user.Get_CheckSub_Data.Check_No,
                Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
                Que_list: JSON.stringify(this.tdata3),
              })
            )
            .then((res) => {})
            .catch((eorro) => {
              console.log(eorro);
            });
        }

        if (this.show.Gw_Yyqk == "1") {
          axios
            .post(
              window.globalUrl.server + "Service.asmx/GwMediInfo_Submit",
              JSON.stringify({
                User_Code: this.User_Code,
                Interface_Code: this.Interface_Code,
                Check_No: this.user.Get_CheckSub_Data.Check_No,
                Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
                Que_list: JSON.stringify(this.tdata4),
              })
            )
            .then((res) => {})
            .catch((eorro) => {
              console.log(eorro);
            });
        }
        await axios
          .post(
            window.globalUrl.server + "Service.asmx/HealtQues_Submit",
            JSON.stringify({
              User_Code: this.User_Code,
              Interface_Code: this.Interface_Code,
              Check_No: this.user.Get_CheckSub_Data.Check_No,
              Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
              Que_list: JSON.stringify(this.sss),
            })
          )
          .then((res) => {
            if (res.data.RltCode == 1) {
              this.loading.close();
              showDialog({
                message: "健康问答提交成功。",
                theme: "round-button",
              }).then(() => {});
            }
          })
          .catch((eorro) => {
            console.log(eorro);
          });
        this.user.Get_CheckSub_Data = {};
        this.user.Get_CheckSub_Data = {};
        await this.$nextTick(() => {
          sessionStorage.removeItem("xq1");
          sessionStorage.removeItem("t1");
          sessionStorage.removeItem("t2");
          sessionStorage.removeItem("t3");
          sessionStorage.removeItem("t4");
          sessionStorage.removeItem("ts4");
          sessionStorage.removeItem("sx");
          sessionStorage.removeItem("wd");
          sessionStorage.removeItem("data");
          this.dd = [];
          this.send = true;
          this.user.jkwd = [];
          this.user.tableData1 = [];
          this.user.tableData2 = [];
          this.user.tableData3 = [];
          this.user.tableData4 = [];
          this.user.tableDatas4 = [];
          this.user.tableDatasx = [];
        });
      }
    },
    rmovesss() {
      this.sss1 = this.user.jkwd;
      this.sss1.forEach((item) => {
        item.forEach((item1) => {
          item1.checkedlist = Array.from(item1.checkedlist).join(",");
        });
      });
    },
    removesss1() {
      this.sss = this.sss1.map((array) =>
        array.map((item1) => ({
          Sub_Type: item1["Sub_TypeID"],
          Sub_ID: item1["Sub_ID"],
          Sub_OptRlt:
            item1["check"] == "" ? item1["checkedlist"] : item1["check"],
          Sub_OtOptID: item1["Sub_OtOptID"],
          Sub_OtOptRlt: item1["Sub_OtOptRlt"],
        }))
      );
    },
    getshow() {
      axios
        .post(
          window.globalUrl.server + "Service.asmx/GetUserGwBaseQues2",
          JSON.stringify({
            User_Code: this.User_Code,
            Interface_Code: this.Interface_Code,
          })
        )
        .then((res) => {
          this.show = JSON.parse(res.data.RltData);
        });
    },
    handleSubmits1(data1, data2) {
      this.showDialogs1 = data1;
      this.dd = [];
      sessionStorage.removeItem("t1");
      sessionStorage.removeItem("t2");
      sessionStorage.removeItem("t3");
      sessionStorage.removeItem("t4");
      sessionStorage.removeItem("ts4");
      sessionStorage.removeItem("sx");
      this.user.tableData1 = [];
      this.user.tableData2 = [];
      this.user.tableData3 = [];
      this.user.tableData4 = [];
      this.user.tableDatas4 = [];
      this.user.tableDatasx = [];
      sessionStorage.removeItem("wd");
      axios
        .post(
          window.globalUrl.server + "Service.asmx/GetQueInHoss",
          JSON.stringify({
            User_Code: this.User_Code,
            Interface_Code: this.Interface_Code,
            Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
          })
        )
        .then((res) => {
          if (res.data.RltCode == 1) {
            console.log("立棍", JSON.parse(res.data.RltData));
            this.t1 = JSON.parse(res.data.RltData);
            this.t1 = this.t1.map((item) => ({
              date1: item["Hos_InDate"],
              date2: item["Hos_OutDate"],
              date3: item["Hos_Cause"],
              date4: item["Hos_Group"],
              date5: item["Hos_No"],
            }));
            this.user.tableData1 = this.t1;
            sessionStorage.setItem("t1", JSON.stringify(this.t1));
          }
        });
      axios
        .post(
          window.globalUrl.server + "Service.asmx/GetQueJws_Sss",
          JSON.stringify({
            User_Code: this.User_Code,
            Interface_Code: this.Interface_Code,
            Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
          })
        )
        .then((res) => {
          if (res.data.RltCode == 1) {
            console.log("立狗", JSON.parse(res.data.RltData));
            this.sx = JSON.parse(res.data.RltData);
            this.sx = this.sx.map((item) => ({
              date1: item["Jws_qzrq"],
              date2: item["Jws_mc"],
            }));
            this.user.tableDatasx = this.sx;
            sessionStorage.setItem("sx", JSON.stringify(this.sx));
          }
        });

      axios
        .post(
          window.globalUrl.server + "Service.asmx/GetQueHomeHoss",
          JSON.stringify({
            User_Code: this.User_Code,
            Interface_Code: this.Interface_Code,
            Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
          })
        )
        .then((res) => {
          if (res.data.RltCode == 1) {
            console.log("立棍", JSON.parse(res.data.RltData));
            this.t2 = JSON.parse(res.data.RltData);
            this.t2 = this.t2.map((item) => ({
              date1: item["Hos_InDate"],
              date2: item["Hos_OutDate"],
              date3: item["Hos_Cause"],
              date4: item["Hos_Group"],
              date5: item["Hos_No"],
            }));
            this.user.tableData2 = this.t2;
            sessionStorage.setItem("t2", JSON.stringify(this.t2));
          }
        });

      axios
        .post(
          window.globalUrl.server + "Service.asmx/GetQueInoculs",
          JSON.stringify({
            User_Code: this.User_Code,
            Interface_Code: this.Interface_Code,
            Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
          })
        )
        .then((res) => {
          if (res.data.RltCode == 1) {
            console.log("立棍", JSON.parse(res.data.RltData));
            this.t3 = JSON.parse(res.data.RltData);
            this.t3 = this.t3.map((item) => ({
              name: item["Ino_Name"],
              date1: item["Ino_Date"],
              date2: item["Ino_Group"],
            }));
            this.user.tableData3 = this.t3;
            sessionStorage.setItem("t3", JSON.stringify(this.t3));
          }
        });

      axios
        .post(
          window.globalUrl.server + "Service.asmx/GetQueUseMedis",
          JSON.stringify({
            User_Code: this.User_Code,
            Interface_Code: this.Interface_Code,
            Check_No: this.user.Get_CheckSub_Data.Check_No,
          })
        )
        .then((res) => {
          if (res.data.RltCode == 1) {
            console.log("立棍", JSON.parse(res.data.RltData));
            this.ts4 = JSON.parse(res.data.RltData);
            this.user.tableDatas4 = this.ts4.map((item) => ({
              name: item["Medi_Name"],
              date1: item["Medi_UseName"],
              date1_id: item["Medi_Use"],
              date2: item["Medi_freqName"],
              date2_id: item["Medi_freq"],
              date3: item["Medi_EachDose"],
              date4: item["Medi_EachDoseUnit"],
              date5: item["Medi_DoseUnitName"],
              date5_id: item["Medi_DoseUnit"],
              date6: item["Medi_UseDate"],
              date7: item["Medi_UseDateUnitName"],
              date7_id: item["Medi_UseDateUnit"],
              date8: item["Medi_MedicineYieldName"],
              date8_id: item["Medi_MedicineYield"],
              // date9: item["Medi_Sugg"],
              // date9_id: item["Medi_TypeID"],
            }));
            sessionStorage.setItem(
              "ts4",
              JSON.stringify(this.user.tableDatas4)
            );
            this.user.tableData4 = this.user.tableDatas4.map((item) => ({
              name: item["name"],
              date1: item["date1"],
              date1_id: item["date1_id"],
              date2:
                item["date2"] +
                item["date3"] +
                "次；1次" +
                item["date4"] +
                item["date5"],
              date2_id: item["date2_id"],
              date3: item["date3"],
              date4: item["date6"] + item["date7"],
              dates4: item["date4"],
              date5: item["date5"],
              date5_id: item["date5_id"],
              date6: item["date6"],
              date7: item["date7"],
              date7_id: item["date7_id"],
              date8: item["date8"],
              date8_id: item["date8_id"],
              // date9: item["date9"],
              // date9_id: item["date9_id"],
            }));
            sessionStorage.setItem("t4", JSON.stringify(this.user.tableData4));
          }
        });
      this.getwt();
      window.scrollTo(0, 0);
    },
    handleSubmit1(data1, data2) {
      // 将数据添加到 tableData1
      this.tableData1 =
        this.user.tableData1 != null ? this.user.tableData1 : this.tableData1;
      this.tableData1.push({
        date1: data1.date1,
        date2: data1.date2,
        date3: data1.date3,
        date4: data1.date4,
        date5: data1.date5,
      });
      this.user.tableData1 = this.tableData1;
      sessionStorage.setItem("t1", JSON.stringify(this.tableData1));
      ElMessage.success({ message: "添加成功" });
      this.showDialog1 = data2;
      console.log(this.tableData1);
    },
    handleSubmit2(data1, data2) {
      // 将数据添加到 tableData2
      this.tableData2 =
        this.user.tableData2 != null ? this.user.tableData2 : this.tableData2;
      this.tableData2.push({
        date1: data1.date1,
        date2: data1.date2,
        date3: data1.date3,
        date4: data1.date4,
        date5: data1.date5,
      });
      this.user.tableData2 = this.tableData2;
      sessionStorage.setItem("t2", JSON.stringify(this.tableData2));
      ElMessage.success({ message: "添加成功" });
      this.showDialog2 = data2;
      console.log(this.tableData2);
    },
    handleSubmit3(data1, data2) {
      // 将数据添加到 tableData3
      this.tableData3 =
        this.user.tableData3 != null ? this.user.tableData3 : this.tableData3;
      this.tableData3.push({
        name: data1.name,
        date1: data1.date1,
        date2: data1.date2,
      });
      this.user.tableData3 = this.tableData3;
      sessionStorage.setItem("t3", JSON.stringify(this.tableData3));
      ElMessage.success({ message: "添加成功" });
      this.showDialog3 = data2;
      console.log(this.tableData3);
    },
    handleSubmit4(data1, data2) {
      this.tableDatas4 =
        this.user.tableDatas4 != null
          ? this.user.tableDatas4
          : this.tableDatas4;
      this.tableDatas4.push(data1);
      this.user.tableDatas4 = this.tableDatas4;
      sessionStorage.setItem("ts4", JSON.stringify(this.tableDatas4));
      // 将数据添加到 tableData4
      // 确保 tableData4 不为 null
      this.tableData4 =
        this.user.tableData4 != null ? this.user.tableData4 : this.tableData4;

      // 创建新的对象 add
      const add = {
        name: data1.name,
        date1: data1.date1,
        date2: `${data1.date2}${data1.date3}次；1次${data1.date4}${data1.date5}`,
        date3: data1.date3,
        date4: `${data1.date6}${data1.date7}`,
        dates4: data1.date4,
        date5: data1.date5,
        date6: data1.date6,
        date7: data1.date7,
        date8: data1.date8,
        date1_id: data1.date1_id,
        date2_id: data1.date2_id,
        date5_id: data1.date5_id,
        date7_id: data1.date7_id,
        date8_id: data1.date8_id,
      };

      // 检查是否已存在相同名称的条目
      const adder = this.tableData4.some((item) => item.name === add.name);

      if (!adder) {
        ElMessage.success({ message: "添加成功" });
        this.tableData4.push(add);
      } else {
        ElMessage.error({ message: "已有重复药品" });
      }
      this.user.tableData4 = this.tableData4;
      sessionStorage.setItem("t4", JSON.stringify(this.tableData4));
      this.showDialog4 = data2;
    },
    h1(data1) {
      this.showDialog1 = data1;
    },
    h2(data1) {
      this.showDialog2 = data1;
    },
    h3(data1) {
      this.showDialog3 = data1;
    },
    h4(data1) {
      this.showDialog4 = data1;
    },
    hsx(data1) {
      this.showDialogsx = data1;
    },
    handleSubmitsx(data1, data2) {
      // 将数据添加到 tableData1
      this.tableDatasx =
        this.user.tableDatasx != null
          ? this.user.tableDatasx
          : this.tableDatasx;
      this.tableDatasx.push({
        date1: data1.date1,
        date2: data1.date2,
      });
      this.user.tableDatasx = this.tableDatasx;
      sessionStorage.setItem("sx", JSON.stringify(this.tableDatasx));
      ElMessage.success({ message: "添加成功" });
      this.showDialogsx = data2;
    },
    //保证齿列里面的填值每位都不重复
    removeDuplicateCharacters(str) {
      const seen = new Set();

      const result = [];

      for (let char of str) {
        if (!seen.has(char)) {
          seen.add(char);

          result.push(char);
        }
      }

      return result.join("");
    },
    updateInputValue00(value1, value2) {
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (
            item1.Sub_Name == value2.Sub_Name &&
            item1.Sub_ID == value2.Sub_ID
          ) {
            item1.check = value1.replace(/[^\d|.]/g, "").slice(0, 4);
          }
        });
      });
      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    updateInputValue0(value1, value2) {
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (
            item1.Sub_Name == value2.Sub_Name &&
            item1.Sub_ID == value2.Sub_ID
          ) {
            item1.check = value1;
          }
        });
      });
      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    updateInputValue(value1, value2) {
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (
            item1.Sub_Name == value2.Sub_Name &&
            item1.Sub_ID == value2.Sub_ID
          ) {
            //保证齿列填值每位是一个0到8的数字字符串,且字符串长度不能超过8位
            item1.check = this.removeDuplicateCharacters(
              value1.replace(/[^1-8]+-|(?=.*(\d).*\1)|[a-zA-Z09]/g, "")
            ).slice(0, 8);
          }
        });
      });
      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    updateInputValue1(value1, value2, value3) {
      // alert(JSON.stringify(value3));
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (
            item1.Sub_Name == value2.Sub_Name &&
            item1.Sub_ID == value2.Sub_ID
            //   &&
            //  ( (item1.check==""?item1.checkedlist:item1.check).includes("其他")==true||(item1.check==""?item1.checkedlist:item1.check).includes("有")==true||(item1.check==""?item1.checkedlist:item1.check).includes("异常")==true)
          ) {
            item1.Sub_OtOptID = value3.Sub_OtOptID;
            item1.Sub_OtOptRlt = value1;
          }
        });
      });
      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    //多选操作
    onerinet(option1, option2, option3, option4, option5) {
      const option4Array = option4.split(",");
      // 替换 option4 数组的内容
      console.log("option5:", option5);
      console.log("option4:", option4Array);
      console.log(
        "Are they equal:",
        JSON.stringify(option5) === JSON.stringify(option4Array)
      );
      option4Array.splice(0, option4Array.length, ...option5);
      // 打印结果
      console.log("option5:", option5);
      console.log("option4:", option4Array);
      console.log(
        "Are they equal:",
        JSON.stringify(option5) === JSON.stringify(option4Array)
      );
      console.log("option3", option3);
      //  alert(JSON.stringify(option3));
      //  alert(JSON.stringify(option1));
      // alert(JSON.stringify( this.getxx(option3)))
      console.log(option2);
      console.log(this.user.jkwd);
      console.log("xdd", option1);
      this.user.jkwd.forEach((item1) => {
        // console.log(item1)
        item1.forEach((item) => {
          if (item.Sub_ID == option1.Sub_ID) {
            if (
              this.getxx(option3) &&
              this.getxx(option3).Opt_IsNormal.trim() == "1"
            ) {
              if (
                option1.Opt_IsNormal.trim() == "" &&
                item.checkedlist.includes(option1.Opt_Name) == false
              ) {
                item.checkedlist = item.checkedlist;
              } else if (option1.Opt_IsNormal.trim() == "1") {
                item.checkedlist = [option1.Opt_Name];
                item.Sub_OtOptRlt = "";
              } else if (
                option1.Opt_IsNormal.trim() == "" &&
                item.checkedlist.includes(this.getxx(option3).Opt_Name) == true
              ) {
                var xb = item.checkedlist.findIndex(
                  (item) => item == this.getxx(option3).Opt_Name
                );
                item.checkedlist.splice(xb, 1);
              }
            } else {
              if (option1.Opt_IsNormal.trim() == "") {
                item.checkedlist = item.checkedlist;
              }
            }
          }
        });
      });
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (item1.Val_Type == "0" && item1.Val_SctMode == "1") {
            console.log("ggb", item1);
            this.mrr = item.filter((list) => list.Rever_Sub == item1.Sub_ID);
            const m1 = this.mrr.filter(
              (list1) => list1.Sub_SysType >= 5 && list1.Sub_SysType <= 8
            );
            const m2 = this.mrr.filter(
              (list1) => list1.Sub_SysType >= 9 && list1.Sub_SysType <= 12
            );
            const m3 = this.mrr.filter(
              (list1) => list1.Sub_SysType >= 13 && list1.Sub_SysType <= 16
            );
            console.log("m1", m1);
            console.log("m2", m2);
            console.log("m3", m3);
            console.log("mrr", this.mrr);
            item
              .filter((list) => list.Rever_Sub == item1.Sub_ID)
              .forEach((item2) => {
                console.log("eet", item2);
                if (
                  this.mrr.length > 0 &&
                  m1.length > 0 &&
                  m2.length > 0 &&
                  m3.length > 0
                ) {
                  if (item1.checkedlist.join(",") == item2.Rever_Val) {
                    item2.check = "";
                  } else if (
                    item1.checkedlist.includes(option1.Opt_Name) == false &&
                    item2.Sub_SysType >= 5 &&
                    item2.Sub_SysType <= 8
                  ) {
                    console.log("m1", m1);
                    m1.forEach((item4) => {
                      if (item4.Sub_Name.includes(option1.Opt_Name)) {
                        item4.check = "";
                      }
                    });
                  } else if (
                    item1.checkedlist.includes(option1.Opt_Name) == false &&
                    item2.Sub_SysType >= 9 &&
                    item2.Sub_SysType <= 12
                  ) {
                    m2.forEach((item4) => {
                      if (item4.Sub_Name.includes(option1.Opt_Name)) {
                        item4.check = "";
                      }
                    });
                  } else if (
                    item1.checkedlist.includes(option1.Opt_Name) == false &&
                    item2.Sub_SysType >= 13 &&
                    item2.Sub_SysType <= 16
                  ) {
                    m3.forEach((item4) => {
                      if (item4.Sub_Name.includes(option1.Opt_Name)) {
                        item4.check = "";
                      }
                    });
                  }
                }
              });
          }
        });
      });

      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    //单选操作
    onuser(option1, option2, option3, option4, option5) {
      console.log("option111", option1);
      console.log("option222", option2);
      console.log("option333", option3);
      console.log("option444", option4);
      console.log("option555", option5);
      console.log("111d", this.getxx(option5).Opt_Name);
      this.install = this.getxx(option5).Opt_Name;
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (item1.Val_Type == "0" && item1.Val_SctMode == "0") {
            if (item1.Sub_ID == option4.Sub_ID && item1.check != "") {
              if (item1.check == this.install) {
                item1.Sub_OtOptRlt = "";
              }
              item
                .filter((list) => list.Rever_Sub == option4.Sub_ID)
                .forEach((item2) => {
                  if (item1.check == item2.Rever_Val) {
                    item2.check = "";
                    item2.checkedlist = "";
                    item2.Sub_OtOptRlt = "";
                    document.body
                      .querySelectorAll(`#tt${item1.Sub_ID}`)
                      .forEach((item3) => {
                        item3.style.display = "none";
                      });
                  } else {
                    document.body
                      .querySelectorAll(`#tt${item1.Sub_ID}`)
                      .forEach((item3) => {
                        item3.style.display = "";
                      });
                  }
                });
            }
          }
        });
      });
      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    onuser1(val) {
      console.log("val", val);
      this.user.jkwd.forEach((item) => {
        item.forEach((item1) => {
          if (item1.Sub_Name == val[0].Sub_Name) {
            item1.check = "";
            item1.Sub_OtOptRlt = "";
          }
          if (
            item1.Sub_Name == val[0].Sub_Name &&
            item1.Sub_ID == val[0].Sub_ID
          ) {
            item1.check == "";
            item1.Sub_OtOptRlt = "";
            item
              .filter((list) => list.Rever_Sub == val[0].Sub_ID)
              .forEach((item2) => {
                item2.check = "";
                item1.Sub_OtOptRlt = "";
              });
          }
        });
      });
      sessionStorage.setItem("wd", JSON.stringify(this.user.jkwd));
    },
    //选项列表模糊匹配默认值
    //初始化数据操作
    getDD() {
      var obj1 = {},
        newArr1 = [];
      this.dds.forEach(function (item, suffix) {
        //根据对象的属性是唯一的，将值作为对象的属性名
        if (!obj1[item.Sub_TypeName]) {
          var arr1 = [];
          arr1.push(item);
          newArr1.push(arr1);
          obj1[item.Sub_TypeName] = item;
        } else {
          newArr1.forEach(function (value, index) {
            //如果已经存在  就循环新组的值将值插入属性相同的数组里   为了防止重复添加   只要和第一个比较就可以了
            if (value[0].Sub_TypeName == item.Sub_TypeName) {
              value.push(item);
            }
          });
        }
      });
      this.dd = newArr1;
      
      this.dd.forEach((item) => {
        item.forEach((item1) => {
          if (
            item1.Val_Type == "1" &&
            item1.Rever_Val == "" &&
            item1.Rever_Sub == ""
          ) {
            item1.check = item1.Val_Def;
          } else if (
            item1.Val_Type == "0" &&
            item1.Val_SctMode == "2" &&
            item1.Rever_Val == "" &&
            item1.Rever_Sub == ""
          ) {
            item1.check = item1.Val_Def;
          } else if (item1.Val_Type == "0" && item1.Val_SctMode == "0") {
            console.log(
              "xcv",
              this.exec(item1.Val_Def, this.get_Valdef(item1))
            );
            item1.check = this.exec(item1.Val_Def, this.get_Valdef(item1));

            // item1.check = item1.Val_Def
            this.dd.forEach((items) => {
              const drr = items.filter(
                (list) => list.Rever_Sub == item1.Sub_ID
              );
              if (drr.length > 0) {
                console.log("drr", drr);
                drr.forEach((item2) => {
                  if (item1.check == item2.Rever_Val) {
                    item2.check = "";
                    item2.checkedlist = "";
                    item2.Sub_OtOptRlt = "";
                  } else {
                    if (item2.Val_Type == "1") {
                      item2.check = item2.Val_Def;
                      item2.checkedlist = "";
                      item2.Sub_OtOptRlt = "";
                    } else if (
                      item2.Val_Type == "0" &&
                      item2.Val_SctMode == "2"
                    ) {
                      item2.check = item2.Val_Def;
                      item2.checkedlist = "";
                      item2.Sub_OtOptRlt = "";
                    } else if (
                      item2.Val_Type == "0" &&
                      item2.Val_SctMode == "1"
                    ) {
                      var def = item2.Val_Def.split(",");
                      console.log("deeef", item2.Val_Def);
                      // item2.check = item2.Val_Def;
                      item2.checkedlist = this.exec1(
                        def,
                        this.get_Valdef(item2)
                      );
                    }
                  }
                });
              }
            });
          } else if (item1.Val_Type == "0" && item1.Val_SctMode == "1") {
            var def = item1.Val_Def.split(",");
            console.log("zxc", this.exec1(def, this.get_Valdef(item1)));
            item1.checkedlist = this.exec1(def, this.get_Valdef(item1));
            console.log("item1.Sub_OtOptRlt", item1.Sub_OtOptRlt);
            this.dd.forEach((items) => {
              const drrs = items.filter(
                (list) => list.Rever_Sub == item1.Sub_ID
              );
              if (drrs.length > 0) {
                console.log("drrs", drrs);
                drrs.forEach((item2) => {
                  if (item1.check == item2.Rever_Val) {
                    item2.check = "";
                  } else {
                    item2.check = item2.Val_Def;
                  }
                });
              }
            });
          }
        });
      });
      this.getdd();
      console.log("this.dd", this.dd);
    },
    exec(t1, t2) {
      console.log("jd", t1, t2);
      let list=""
      let exactMatch = null;
      let partialMatch = null;
      let foundExact = false;
       if(t1==""){
        return  list
       }
      // 首先，检查全等匹配
      for (const item of t2) {
        const optName = item.Opt_Name;
        if (t1 === optName) {
          // 使用 === 进行全等比较
          exactMatch = optName;
          foundExact = true;
          break; // 找到全等匹配项，立即退出循环
        }
      }

      // 如果没有找到全等匹配项，则检查包含匹配
      if (!foundExact) {
        for (const item of t2) {
          const optName = item.Opt_Name;
          if (t1.includes(optName)) {
            // 检查 t1 字符串是否包含 optName
            partialMatch = optName;
            // 找到第一个包含匹配项后，我们可以立即返回
            break; // 退出循环，因为我们已经找到了一个包含匹配项
          }
        }
      }

      // 根据找到的匹配项返回结果
      if (foundExact) {
        console.log("dd1tv exact", exactMatch);
        return exactMatch; // 返回全等匹配项
      } else if (partialMatch !== null) {
        console.log("dd1tv partial", partialMatch);
        return partialMatch; // 返回第一个找到的包含匹配项
      }
    },
    exec1(t1, t2) {
      console.log("jd", t1, t2);

      let matches = []; // 用于存储所有匹配项的数组
      let exactMatches = new Set(); // 使用Set来跟踪已经找到的全等匹配项，以避免重复

      // 首先，检查全等匹配
      for (const item of t2) {
        const optName = item.Opt_Name;
        if (t1.includes(optName)) {
          // 只添加还未添加到exactMatches中的全等匹配项（虽然在这个逻辑下通常不会有重复）
          if (!exactMatches.has(optName)) {
            exactMatches.add(optName);
            matches.push(optName); // 将全等匹配项添加到matches数组中
          }
        }
      }

      // 如果没有找到全等匹配项（实际上，我们不需要检查这个，因为我们要么添加到了exactMatches，要么稍后会添加包含匹配）
      // 但为了保持逻辑清晰，我们可以注释说明这一点
      // if (exactMatches.size === 0) { // 这行代码实际上不是必需的，因为我们总是会执行包含匹配的检查
      // 接着，检查包含匹配
      for (const str of t1) {
        for (const item of t2) {
          const optName = item.Opt_Name;
          if (str.includes(optName) && !exactMatches.has(optName)) {
            // 如果是包含匹配且不是已经找到的全等匹配项，则添加到matches数组中
            matches.push(optName);
            // 注意：我们不需要再次检查matches数组是否已包含optName，
            // 因为每个optName只会被添加一次（无论是全等还是包含）
          }
        }
        // } // 这对花括号也不是必需的，因为上面的if条件被注释掉了
      }

      // 返回所有找到的匹配项
      console.log("matches", matches);
      return matches; // 返回包含所有匹配项的数组
    },
    getdd() {
      this.$nextTick(() => {
        this.dd.forEach((item) => {
          item.forEach((item1) => {
            this.dd.forEach((item2) => {
              item2.forEach((item3) => {
                if (
                  item1.Sub_ID == item3.Rever_Sub &&
                  item1.check == item3.Rever_Val
                ) {
                  item2
                    .filter((list) => list.Rever_Sub == item1.Sub_ID)
                    .forEach((item2) => {
                      document.body
                        .querySelectorAll(`#tt${item2.Rever_Sub}`)
                        .forEach((item) => {
                          item.style.display = "none";
                        });
                    });
                }
              });
            });
          });
        });
        this.$forceUpdate();
      });
    },
    getlist() {
      var obj1 = {},
        newArr1 = [];
      this.lists.forEach(function (item, suffix) {
        //根据对象的属性是唯一的，将值作为对象的属性名
        if (!obj1[item.Sub_ID]) {
          var arr1 = [];
          arr1.push(item);
          newArr1.push(arr1);
          obj1[item.Sub_ID] = item;
        } else {
          newArr1.forEach(function (value, index) {
            //如果已经存在  就循环新组的值将值插入属性相同的数组里   为了防止重复添加   只要和第一个比较就可以了
            if (value[0].Sub_ID == item.Sub_ID) {
              value.push(item);
            }
          });
        }
      });
      this.ed = newArr1;
      console.log("eedd", this.ed);
    },
    removeExtraFields() {
      this.dds = this.wtlist.map((item) => ({
        Sub_ID: item["Sub_ID"],
        Sub_TypeID: item["Sub_TypeID"],
        Sub_TypeName: item["Sub_TypeName"],
        Sub_Rank: item["Sub_Rank"],
        check: "",
        check1: "",
        Val_Old: item["Val_Old"],
        Rever_Sub: item["Rever_Sub"],
        Rever_Val: item["Rever_Val"],
        Val_Def: item["Val_Def"],
        Val_Type: item["Val_Type"],
        Val_SctMode: item["Val_SctMode"],
        Sub_Name: item["Sub_Name"],
        checkedlist: new Array(),
        Sub_OtOptID: item["Val_OtID"] ? item["Val_OtID"] : "",
        Sub_OtOptRlt: item["Val_OtValue"],
        Val_OtOpts: item["Val_OtOpts"],
        Sub_SysType: item["Sub_SysType"],
        Sub_Requisite: item["Sub_Requisite"],
      }));
      console.log(this.dds);
      this.mms = this.wtlist.map((item) => ({
        [this.keepField]: item[this.keepField],
        [this.keepField2]: item[this.keepField2],
        Opt_Score: "",
        User_Code: this.User_Code,
        Interface_Code: this.Interface_Code,
        Check_No: "01",
        Tz_Id: item["Tz_Id"],
        Tz_Name: item["Tz_Name"],
        Opt_ID: "",
      }));
    },

    handleFocus() {
      // 键盘弹出事件，根据实际情况可能需要自定义
      this.scale = 1;
    },
    handleBlur() {
      // 键盘收起事件，恢复缩放比例
      this.scale = 1;
    },
    handleGoKey(event) {
      // 关闭软键盘的示例代码
      if (event.key === "Enter") {
        event.target.blur();
      } // 假设你的input元素有ref="input"
    },
    set() {
      this.$router.push("/ewm");
    },
    sets() {
      this.$router.push("/smcs");
    },
    getyclists() {
      var obj4 = {},
        newArr4 = [];
      this.wtlist.forEach(function (item, suffix) {
        //根据对象的属性是唯一的，将值作为对象的属性名
        if (!obj4[item.Sub_TypeName]) {
          var arr4 = [];
          arr4.push(item);
          newArr4.push(arr4);
          obj4[item.Sub_TypeName] = item;
        } else {
          newArr4.forEach(function (value, index) {
            //如果已经存在  就循环新组的值将值插入属性相同的数组里   为了防止重复添加   只要和第一个比较就可以了
            if (value[0].Sub_TypeName == item.Sub_TypeName) {
              value.push(item);
            }
          });
        }
      });
      this.ue = newArr4;
      console.log(this.ue);
    },
    getwt() {
      this.dd = [];
      sessionStorage.removeItem("wd");
      this.user.jkwd = [];
      axios
        .post(
          window.globalUrl.server + "Service.asmx/Get_User_QueSuggSubs",
          JSON.stringify({
            User_Code: this.User_Code,
            Interface_Code: this.Interface_Code,
            Check_No: this.user.Get_CheckSub_Data.Check_No,
            Pson_Name: this.user.Get_CheckSub_Data.Pson_Name,
            Check_Date: this.user.Get_CheckSub_Data.Check_Date,
            Pson_Age: this.user.Get_CheckSub_Data.Pson_Age,
            Pson_Sex: this.user.Get_CheckSub_Data.Pson_Sex,
            Pson_Tel: this.user.Get_CheckSub_Data.Pson_Tel,
            Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
            Pson_Addr: this.user.Get_CheckSub_Data.address,
            Pson_Tag: this.user.Get_CheckSub_Data.Pson_Tag,
            Check_Package: "",
            Check_Site: this.user.Get_CheckSub_Data.Site_ID,
          })
        )
        .then((res) => {
          if (res.data.RltCode == 1) {
            console.log("ddd", res);
            console.log("1nnnnnnnnnnn", JSON.parse(res.data.RltData));
            this.wtlist = JSON.parse(res.data.RltData);
            console.log("jjjj", this.wtlist);
            axios
              .post(
                window.globalUrl.server +
                  "Service.asmx/Get_User_QueSuggSub_Opts",
                JSON.stringify({
                  User_Code: this.User_Code,
                  Interface_Code: this.Interface_Code,
                  Check_No: this.user.Get_CheckSub_Data.Check_No,
                  Pson_Name: this.user.Get_CheckSub_Data.Pson_Name,
                  Check_Date: this.user.Get_CheckSub_Data.Check_Date,
                  Pson_Age: this.user.Get_CheckSub_Data.Pson_Age,
                  Pson_Sex: this.user.Get_CheckSub_Data.Pson_Sex,
                  Pson_Tel: this.user.Get_CheckSub_Data.Pson_Tel,
                  Pson_CardID: this.user.Get_CheckSub_Data.Pson_CardID,
                  Pson_Addr: this.user.Get_CheckSub_Data.address,
                  Pson_Tag: this.user.Get_CheckSub_Data.Pson_Tag,
                  Check_Package: "",
                  Check_Site: this.user.Get_CheckSub_Data.Site_ID,
                })
              )
              .then((res) => {
              if(res.data.RltCode == 1){
                  console.log(JSON.parse(res.data.RltData));
                this.lists = JSON.parse(res.data.RltData);
                this.getlist();
                localStorage.setItem("setupdef", JSON.stringify(this.setupdef));
                this.getyclists();
                this.removeExtraFields();
                this.getDD();
                sessionStorage.setItem("wd", JSON.stringify(this.dd));
                this.user.jkwd = this.dd;
                this.getdd();
              }else if(res.data.RltCode == 2){
                this.lists=[]
                this.getlist();
                localStorage.setItem("setupdef", JSON.stringify(this.setupdef));
                this.getyclists();
                this.removeExtraFields();
                this.getDD();
                sessionStorage.setItem("wd", JSON.stringify(this.dd));
                this.user.jkwd = this.dd;
                this.getdd();
              }
              });
          }
        });
    },
  },
  computed: {
    getsetupdef() {
      return (u) => {
        return Array.from(this.wtlist).filter(
          (list) => list.Sub_ID == u.Sub_ID
        )[0].Val_Old;
      };
    },
    getSub_OtOptRlt() {
      return (u) => {

        return Array.from(this.wtlist).filter(
          (list) => list.Sub_ID == u.Sub_ID
        )[0].Val_OtValue;
      };
    },
    getvaldef() {
      return (u) => {
        return Array.from(this.wtlist).filter(
          (list) => list.Sub_ID == u.Sub_ID
        )[0].Val_Old;
      };
    },
    sss() {
      return (u) => {
        Array.from(this.wtlist).filter((list) => list.Rever_Sub == u.Sub_ID);
      };
    },
    //根据问题id匹配对应的选项组
    getUserPosts() {
      this.getlist();
      console.log(this.ed);
      return (u) => {
        return Array.from(this.lists).filter(
          (list) => list.Sub_Name === u.Sub_Name
        );
      };
    },
    getUserPosts1() {
      this.getlist();
      console.log(this.ed);
      return (u) => {
        return Array.from(this.lists).filter(
          (list) => list.Sub_Name === u.Sub_Name
        )[0];
      };
    },
    getft() {
      return (u) => {
        return Array.from(this.user.jkwd).filter(lists[u]);
      };
    },
  },
  //dom构建阶段
  created() {
    this.Interface_Code = sessionStorage.getItem("item");
    this.User_Code = JSON.parse(sessionStorage.getItem("UserInfo")).sUser_Code;
    this.user = userStore();
    this.getshow();
    this.getwt();
  },
  //dom构建完成
  mounted() {
    window.scrollTo(0, 0);
    console.log("mmmm", document.body.querySelectorAll("#tt520011"));
    this.getdd();
  },
};
</script>

<style scoped>
::v-deep .changed .van-checkbox__icon--checked .van-icon {
  background-color: red !important;
}
::v-deep .changed .van-radio__icon--checked .van-icon {
  background-color: red !important;
}
::v-deep .van-radio__icon::after {
  border-color: red !important;
}
::v-deep #tt520108 {
  margin-top: 0 !important ;
  margin-bottom: 0px !important ;
}
::v-deep #tt520011,
#tt520001 {
  display: inline-flex;
}

.s1 {
  width: 50px;
  text-align: center;
  font-size: 16px;
  line-height: 100px;
}
.q1 {
  display: flex;
  align-content: center;
  justify-items: center;
}
.q2 {
  display: flex;
  align-content: center;
  justify-items: center;
  margin-left: 72px;
}
.q3 {
  display: flex;
  align-content: center;
  justify-items: center;
  margin-left: 72px;
}
.el-col-12,
.el-col-12.is-guttered {
  width: 35px;
}
/* .cross-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cross-icon {
  width: 40px;
  height: 80px;
  background: url("path_to_your_cross_icon_image.png");
  background-repeat: no-repeat;
  background-position: center;
} */

.cross-input {
  width: 70px;
  height: 50px;
  border: 1px solid black;
  /* border-radius: 5px; */
  text-align: center;
  font-size: 12px;
}
.qc {
  display: flex;
}
::v-deep .el-dialog__headerbtn .el-dialog__close {
  color: red;
  font-size: inherit;
}
::v-deep .mmg {
  width: 28px;
  height: 28px;
}
::v-deep .container-title {
  height: auto;
  padding-left: 0;
  background-color: #7baafa;
}
.bbbn {
  /* margin-left: 20px; */
  width: 40px;
  height: 20px;
}
.tab {
  /* width: 100%; */
  position: fixed;
  right: 0;
  z-index: 0;
}
.tabd {
  width: 100%;
  display: flex;
  justify-items: center;
  align-items: center;
}
.tab-list {
  width: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
  /* border: 1px solid; */
}
::v-deep .van-switch {
  font-size: 20px;
}
::v-deep #taa3 {
  /* padding-bottom: 40px; */
}
::v-deep .taa {
  padding: 40px 0px;
}
::v-deep .el-button {
  /* width: 100%; */
}
::v-deep .el-table--fit {
  z-index: 0;
}
::v-deep .el-table .cell {
  display: flex;
  justify-content: center;
}
.s-h3 {
  font-size: 16px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
}
::v-deep .van-field__body {
  border-bottom: 0px solid;
}
::v-deep .van-field {
  border-bottom: 1px solid;
}
::v-deep .van-checkbox__label {
  display: flex;
}
::v-deep .van-cell-group {
  display: flex;
  align-items: center;
  height: 35px;
  /* margin-top: 10px;
  margin-bottom: 10px; */
}
::v-deep .van-radio {
  /* margin-top: 10px; */
  margin-right: 15px;
}
::v-deep .van-checkbox {
  /* margin-top: 10px;
  margin-right: 15px; */
  margin-right: 15px;
}
.ix {
  height: 100%;
}
.dd {
  display: flex;
  align-items: center;
  height: 35px;
  /* margin-top: 10px;
  margin-left: 10px; */
}
.dddd {
  display: flex;
  justify-content: center;
  align-items: center;
}
.dds {
  display: flex;
  align-items: center;
  height: 35px;
  /* margin-left: 20px; */
}
::v-deep .pp {
  font-size: 13px !important ;
  height: 30px;
  line-height: 30px;
  width: 100%;
}
::v-deep .ppp {
  width: 100%;
  margin-left: 0;
  height: 25px;
}
.input {
  font-family: Tahoma, Arial, 宋体;

  font-size: 16px;
  height: 20px;

  line-height: 20px;

  color: #000000;

  border-top-style: none;

  border-right-style: none;

  border-bottom-style: dashed;

  border-left-style: none;

  border-bottom-color: #000000;

  border-top-width: 0px;

  border-right-width: 0px;

  border-bottom-width: 1px;

  border-left-width: 0px;
}
::v-deep .van-cell-group {
  background: var(--van-cell-group-background);
  /* margin-right: 20px; */
}
.tt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  height: 100%;
  margin-top: 5px;
  margin-bottom: 5px;
}
.tts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  height: 100%;
  /* padding-top: 10px;
  padding-bottom: 20px; */
  font-size: 16px;
}
.ttd {
  display: flex;
  align-items: center;
  /* padding-top: 10px; */
  /* padding-bottom: 10px; */
}
.ddd {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rank_title {
  border-bottom: 1px solid;
  /* padding-bottom: 5px; */
  /* padding-top:30px ; */
}
.rank_box {
  height: 100%;
  /* padding-top:30px ; */
}
.tabs {
  display: flex;
  /* border: 1px solid red; */
  position: fixed;
  top: 0;
  left: 300px;
}

.img1 {
  width: 24px;
  height: 24px;
  margin-left: 10px;
}
.i1 {
  width: 48px;
  height: 24px;
}
.s-title {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid burlywood;
  padding-bottom: 3px;
}
input {
  border: 1px solid;
  width: 100px;
}
.t1 {
  display: flex;
  margin-top: 2px;
  height: 17px;
  /* width: 280px; */
}
.container {
  display: flex;
  height: 100vh; /* 全屏高度 */
}

.fixed-sidebar {
  width: 280px; /* 左边部分宽度 */
  background-color: #4486f8;
  /* display: flex; */
  /* height: 100vh; */
  padding: 10px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  /* justify-content: center;
    align-items: center;
    flex-direction: column; */
  /* 背景色 */
}

.scrollable-content {
  flex: 1; /* 可伸缩，占据剩余空间 */
  /* overflow-y: auto;  */
  /* padding: 10px; */
  height: 2145px;
  padding-left: 290px;
  /* padding-top: 30px; */
}
.sidebar-content1 {
  width: 100%;
  padding: 5px;
  height: 180px;
  background-color: #7baafa;
  border-radius: 0px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
  /* margin-left: 12px; */
  border-radius: 5px;
}
.sidebar-content2 {
  width: 100%;
  padding: 3px 5px;
  margin-top: 20px;
  height: 200px;
  background-color: #7baafa;
  border-radius: 0px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
  /* margin-left: 12px; */
  border-radius: 5px;
}
.content2-nent {
  /* width: 280px; */
}
.sidebar-content3 {
  width: 100%;
  padding: 5px;
  height: 45px;
  margin-top: 20px;
  background-color: #7baafa;
  border-radius: 0px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
  /* margin-left: 12px; */
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.st {
  padding: 10px;
}
h2 {
  font-size: 20px;
  font-weight: 900;
}
h5 {
  line-height: 28px;
}
p {
  font-size: 16px;
  margin-left: 5px;
}
::v-deep .messageBox .el-button > span {
  font-size: 16px !important;
  justify-content: center;
  display: flex;
  align-items: center;
}
::v-deep span {
  margin: 0;
}

@media screen and (orientation: portrait) {
  .portrait {
    /* 竖屏样式 */
  }
  ::v-deep .t1 {
    display: flex;
    margin-top: 6px;
    height: 14px;
    /* width: 280px; */
  }
  .fixed-sidebar {
    width: 35%; /* 左边部分宽度 */
    background-color: #4486f8;
    /* display: flex; */
    height: 700px;
    padding: 8px;
    z-index: 1;
    /* justify-content: center;
                            align-items: center;
                            flex-direction: column; */
    /* 背景色 */
  }
  p {
    font-size: 12px;
  }
  ::v-deep .sidebar-content1 {
    width: 100%;
    padding: 10px;
    height: 220px;
    background-color: #7baafa;
    border-radius: 0px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);

    border-radius: 5px;
  }
  ::v-deep .sidebar-content2 {
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    height: 270px;
    background-color: #7baafa;
    border-radius: 0px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
  }
  ::v-deep .sidebar-content3 {
    width: 100%;
    padding: 10px;
    height: 100px;
    margin-top: 20px;
    background-color: #7baafa;
    border-radius: 0px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
  }
  ::v-deep h2 {
    font-size: 25px;
    font-weight: 900;
  }
  .scrollable-content {
    flex: 1; /* 可伸缩，占据剩余空间 */
    overflow-y: auto; /* 滚动条 */
    padding: 10px;
    height: 3345px;
    padding-left: 35%;
  }
  ::v-deep .tabs {
    display: flex;
    /* border: 1px solid red; */
    position: fixed;
    top: 0;
    left: 400px;
  }
  ::v-deep .pp {
    font-size: 25px;
    height: 35px;
    line-height: 35px;
  }
  ::v-deep .el-table .cell {
    font-size: 12px;
  }
  ::v-deep .el-button {
    width: 100%;
  }
}
</style>
